package cn.com.jonpad.mq.ampq.service;

import cn.com.jonpad.mq.ampq.entity.Book;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class BookService {
	@RabbitListener(queues = "atguigu.news")
	public void receive01(Book book){
		log.warn("receive book message:{}",book);
	}

	@RabbitListener(queues = "atguigu")
	public void receive02(Message book){
		log.warn("receive book message:{}",book);
	}
}
